Skip to content

Use htslib - #5

Merged
robert-vogel merged 60 commits into
mainfrom
use_htslib
Mar 26, 2026
Merged

Use htslib#5
robert-vogel merged 60 commits into
mainfrom
use_htslib

Conversation

@robert-vogel

Copy link
Copy Markdown
Collaborator

No description provided.

…. I can run the program and all inputs but --help are parsed correctly.
…xed bug where I don't use the specified data stream to print logger record.
* Writing, which is still in progress, a more detailed README.  The details I am currently working on is defining the distinct type of GRMs, table of contents, referencing sections in the document.
* Adding C libraries to the command line program entry
 point.
robert-vogel and others added 28 commits January 30, 2026 20:20
…to use '\;' and not '\;' as I had been using.
debugging haplotype model equations
…crtiption. Writing binary grm file specification.
…ake of terminating a code block with two back ticks instead of three.
Forgot terminating brace on definition of array.
… grm file specification for clarity of exposition.
Fix grammatical errors in type descriptions, complete the meta data
table with all fields (magic, version, date, user, contig, markers,
samples), correct offset error, and clarify payload section.

https://claude.ai/code/session_0116D5VsHW8prM7LEGxa4TVk
…-Zfza3

Complete .grm file format specification in README.
…pdated to only store upper triangular matrix of GRM
…_ptr to nullptr, fixed. minor bugs in test code and io.h have been resolve.
…Hdr to call data member default constructors instead of setting to nullptr.
Add 42 unit tests covering Coordinates, Samples, Hdr, Grm struct,
MATRIX_IDX_TO_ARRAY macro, and full GRM file I/O. Tests can be built
and run standalone via `make test_grm`.

TestGrmFile.ReadNullArgs FAILS: grm::read(FileIO*, Hdr*, Grm*) at
src/grm.cpp:496 returns ERROR_ON_READ for null pointer arguments,
but the corresponding write function returns ERROR_NULLPTR_ARG.

Also fixes: add missing `inline` on io::open() in include/io.h to
prevent multiple-definition linker errors when included from
multiple translation units.

https://claude.ai/code/session_01FXkdgU8L4ws7LoCu16wG4s
New tests cover:
- Coordinates: single position, null fid, read overwrites existing
- Samples: single sample, empty names (ERROR_INVALID_ARG), null fid,
  read overwrites existing
- Hdr: all GrmType enum values round-trip, version field fidelity,
  null fid
- Grm: 1x1 matrix, set via lower/get via upper triangle, 5x5 matrix
  indexing, move-assign replaces non-empty
- GRM file: empty file read, null fid, magic number verification,
  single-sample round-trip, truncated file, two sequential writes
  then reads

All 66 tests pass.

https://claude.ai/code/session_01FXkdgU8L4ws7LoCu16wG4s
…ison of a unit64_t with an int, I've tried to find all cases and fix by static_cast.
…t tests for all expected haplotype counts. The ground truth values are stored in a csv hd_0i.csv where hd represents haplotype dose and i the sample number.
@robert-vogel
robert-vogel merged commit 7ac0d82 into main Mar 26, 2026
1 check failed
@robert-vogel
robert-vogel deleted the use_htslib branch March 26, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants